
#ifndef DINGWEIH
#define DINGWEIH

/*---------------------------------------------------------------------*/
/* --- STC MCU Limited ------------------------------------------------*/
/* --- STC 1T Series MCU Demo Programme -------------------------------*/
/* --- Mobile: (86)13922805190 ----------------------------------------*/
/* --- Fax: 86-0513-55012956,55012947,55012969 ------------------------*/
/* --- Tel: 86-0513-55012928,55012929,55012966 ------------------------*/
/* --- Web: www.STCMCU.com --------------------------------------------*/
/* --- Web: www.STCMCUDATA.com  ---------------------------------------*/
/* --- QQ:  800003751 -------------------------------------------------*/
/* ����?�ڳ�����ʹ�ô˴���,���ڳ�����ע��ʹ����STC�����ϼ�����            */
/*---------------------------------------------------------------------*/

/*************	����˵��	**************

�����̻���STC8H8K64UΪ����оƬ��ʵ����8���б�д���ԣ�STC8G��STC8Hϵ��оƬ��ͨ�òο�.

��������ʾ��·ADC��ѯ������ͨ������2���͸���λ����������115200,N,8,1��

����ʱ, ѡ��ʱ�� 22.1184MHz (�����������ļ�"config.h"���޸�).

******************************************/

/*************	���س�������	**************/
#define SHEBEI 0x32
#define VERSION 0x500

#include "SC7I22_driver.h"

#define RS485EN P12

extern volatile unsigned char data AdapterSwitchFlag;

extern unsigned char Address;

extern volatile unsigned char data Power_In;
extern volatile unsigned char data Power_Out;

extern volatile unsigned int data Voltage;
extern unsigned int Current;

extern int AM2321_humi;
extern int AM2321_temp;

extern unsigned char chushiqi_real_state;
extern unsigned char chushiqi_want_state;

extern volatile unsigned char data ChargingFlag;

extern unsigned char controlPowerSupplyState;

void Fun(int value);
void Alarm(int value);
void ChuShi(int value);
void setControllablePower(int value);
u8 getControllableStatus();

u8 IsThereAdapter();
void Timer();
void AppInit();
void MainTask();


#endif
